﻿using System;
using System.Collections.Generic;

using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CNVP.Framework;
using System.Data;
using CNVP.JShop.UI;

using CNVP.Framework.Helper;
using CNVP.Framework.Utils;

namespace CNVP.JShop.Web.Controls
{
    public partial class UnderLayer : System.Web.UI.Page
    {
        BLL.CNVP_Ads bll = new BLL.CNVP_Ads();
        DateTime dtnow = DateTime.Now;
        protected void Page_Load(object sender, EventArgs e)
        {
            long ei = Public.DateToStamp(dtnow.Date.AddDays(1));
            long el = Public.DateToStamp(dtnow.Date.AddDays(6));
                StartLoad(1,ei,el);
           
        }

        /// <summary>
        /// PageNavigator1_PageChange 的摘要说明
        /// 分页加载列表函数
        /// </summary>
        protected void StartLoad(int PageIndex,long dt1, long dt2)
        {
            int i, j;
            DataTable dt = null;
            int pageNum = 1000;
            SQLConditionInfo[] st = new SQLConditionInfo[3];
            st[0] = new SQLConditionInfo("@today", dt1);
            st[1] = new SQLConditionInfo("@tommor", dt2);
            st[2] = new SQLConditionInfo("@DisplayType", 0);
            dt = bll.GetPageForStamp(PageIndex, pageNum, out i, out j, st);

            rpList.DataSource = dt;
            rpList.DataBind();

        }
    }
}